#if !defined(TUTORIAL_01_HEADER)
#define TUTORIAL_01_HEADER


#include "vulkan.h"
#include "OperatingSystem.h"

struct VulkanParameters
{
	VkInstance instance;
	VkDevice device;
	uint32_t queueFamilyIndex;
	VkQueue queue;

	VulkanParameters() : instance(VK_NULL_HANDLE), device(VK_NULL_HANDLE), queueFamilyIndex(0u), queue(VK_NULL_HANDLE) {}
};

class Tutorial : public OS::ProjectBase
{
public:
	Tutorial();
	~Tutorial();

public:
	bool OnWindowSizeChanged() override;
	bool Draw() override;

	bool PrepareVulkan();

private:
	OS::LibraryHandle vulkanLibrary_;
	VulkanParameters vulkan_;

	bool LoadVulkanLibrary();
	bool LoadExportedEntryPoints();
	bool LoadGlobalLevelEntryPoints();
	bool CreateInstance();
	bool LoadInstanceLevelEntryPoints();
	bool CreateDevice();
	bool CheckPhysicalDeviceProperties(VkPhysicalDevice physical_device, uint32_t &queue_family_index);
	bool LoadDeviceLevelEntryPoints();
	bool GetDeviceQueue();
};

#endif